package org.zpmis.gateway.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * Description:
 * 统一返回状态码
 *
 * @author LENOVO
 */
public enum ResultCode {

    /* 成功状态码 */
    SUCCESS(200, "成功"),
    /* 失败状态码 */
    ERROR(999,"系统内部错误"),
    SERVER_ERROR(999,"系统超时，请稍后重试！"),

    /* 参数错误：10001-19999 */
    PARAM_ERROR(10001, "参数错误"),

    /* 用户错误 */
    USER_NOT_LOGIN(2001, "用户未登录"),
    USER_ACCOUNT_EXPIRED(2002, "账号已过期"),
    USER_CREDENTIALS_ERROR(2003, "密码错误"),
    USER_CREDENTIALS_EXPIRED(2004, "密码过期"),
    USER_ACCOUNT_DISABLE(2005, "账号不可用"),
    USER_ACCOUNT_LOCKED(2006, "账号被锁定"),
    USER_ACCOUNT_NOT_EXIST(2007, "账号不存在"),
    USER_ACCOUNT_ALREADY_EXIST(2008, "账号已存在"),
    USER_ACCOUNT_USE_BY_OTHERS(2009, "账号下线"),
    USER_NOT_EXIST(3000,"用户未找到"),
    NO_PERMISSION(3001, "没有权限"),
    USER_LOGIN_ERROR(3002, "登录失败"),
    USER_LOGIN_TIMEOUT(3003, "当前登录已过期"),
    USER_LOGIN_TOKEN_VALIED_ERROR(3004, "token校验失败"),
    USER_LOGIN_TOKEN_FORMAT_ERROR(3005, "token格式错误"),
    USER_LOGIN_TOKEN_SIGN_ERROR(3006, "token签名错误"),
    RESOURCE_NOT_FOUND(3007, "资源不存在"),
    ;
    private Integer code;

    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
